/* 宠物小猫样式 */
#pet-cat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: var(--font-mono);
}

.cat-container {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 猫咪身体 - 机器猫风格 */
.cat-body {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #222;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
    transition: all 0.3s ease;
    overflow: visible;
}

/* 猫咪耳朵 */
.cat-body:before, .cat-body:after {
    content: "";
    position: absolute;
    top: -15px;
    width: 30px;
    height: 40px;
    background-color: #222;
    border-radius: 50% 50% 0 0;
    z-index: -1;
}

.cat-body:before {
    left: 20px;
    transform: rotate(-15deg);
}

.cat-body:after {
    right: 20px;
    transform: rotate(15deg);
}

/* 猫咪眼睛 */
.cat-eyes {
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.cat-eyes:before, .cat-eyes:after {
    content: "";
    width: 25px;
    height: 15px;
    background-color: #00ff41; /* 矩阵绿色眼睛 */
    border-radius: 5px;
    box-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
}

/* 猫咪耳机 */
.cat-body .headphones {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #333;
    border-radius: 50px;
    z-index: -1;
}

.cat-body .headphones:before, .cat-body .headphones:after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #333;
    border-radius: 50%;
    border: 2px solid #444;
    box-shadow: inset 0 0 5px rgba(0, 247, 255, 0.5);
}

.cat-body .headphones:before {
    left: -10px;
}

.cat-body .headphones:after {
    right: -10px;
}

/* 猫咪状态 */
.cat-body.happy {
    background-color: #222;
    animation: happy-wiggle 0.5s infinite;
    box-shadow: 0 0 20px var(--accent-color);
}

.cat-body.happy .cat-eyes:before, .cat-body.happy .cat-eyes:after {
    background-color: #00ff41;
    box-shadow: 0 0 15px #00ff41, 0 0 25px #00ff41;
}

.cat-body.sleeping {
    background-color: #111;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

.cat-body.sleeping .cat-eyes:before, .cat-body.sleeping .cat-eyes:after {
    height: 2px;
    background-color: #444;
    box-shadow: none;
}

.cat-body.thinking {
    background-color: #222;
    animation: thinking 2s infinite;
    box-shadow: 0 0 15px var(--accent-color);
}

.cat-body.thinking .cat-eyes:before, .cat-body.thinking .cat-eyes:after {
    background-color: #00f7ff;
    box-shadow: 0 0 15px #00f7ff, 0 0 25px #00f7ff;
    animation: blink 3s infinite;
}

/* 对话气泡 */
.cat-speech-bubble {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 200px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    color: var(--accent-color);
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    z-index: 1001;
}

.cat-speech-bubble:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--accent-color);
}

.cat-container:hover .cat-speech-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* 菜单 */
.cat-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 150px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    z-index: 1001;
}

.cat-container.menu-open .cat-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.menu-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background-color: rgba(0, 247, 255, 0.2);
}

/* 行走动画 */
@keyframes walk-cycle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.cat-container.walking .cat-body {
    animation: walk-cycle 0.5s infinite;
}

/* 猫咪跳跃动画 */
@keyframes jump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.cat-container.jumping {
    animation: jump 0.5s ease-in-out;
}

/* 猫咪旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cat-container.spinning {
    animation: spin 0.8s ease-in-out;
}

/* 思考动画 */
@keyframes thinking {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 开心摇摆动画 */
@keyframes happy-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 眼睛闪烁动画 */
@keyframes blink {
    0%, 45%, 55%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}